﻿using System;
using System.Windows.Forms;
using mki.Backup.Objects.Properties;

namespace mki.Backup.Objects.Dialogs
{
	/// <summary>
	/// Represents the FolderFileBrowserEditorForm class
	/// </summary>
	public partial class FileNameEditorForm : Form
	{
		#region Constructors (1)

		/// <summary>
		/// Initializes a new instance of the <see cref="FileNameEditorForm"/> class.
		/// </summary>
		public FileNameEditorForm()
		{
			InitializeComponent();

			// init
			this.StartPosition = FormStartPosition.CenterParent;
			this.DialogResult = DialogResult.None;
			this.saveButton.Click += delegate { this.DialogResult = DialogResult.OK; };
			this.fileNameTextBox.Enter += (s, e) => this.fileNameToolTip.SetToolTip(this.fileNameTextBox, Resources.FileNameToolTip);

		}

		#endregion Constructors

		#region Properties (1)

		// Public Properties (1) 

		/// <summary>
		/// Gets or sets the name of the file.
		/// </summary>
		/// <value>The name of the file.</value>
		public String FileName
		{
			get { return this.fileNameTextBox.Text; }
			set { this.fileNameTextBox.Text = value; }
		}

		#endregion Properties
	}
}